home *** CD-ROM | disk | FTP | other *** search
- Path: oxy.rust.net!usenet
- From: ebennett@rust.net
- Newsgroups: comp.lang.c++
- Subject: Re: Using templates in BC++ 4.5
- Date: Thu, 25 Jan 1996 04:01:21 GMT
- Organization: Rust Net - High Speed Internet in Detroit 810-642-2276
- Message-ID: <4e6koc$ela@oxy.rust.net>
- References: <31050C2D.674C@tribeca.ios.com>
- NNTP-Posting-Host: liv-18.rust.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- John Leonard <leonardj@tribeca.ios.com> wrote:
-
- >I wrote a windows program, in BC++ 4.52, that uses class templates.
- >The template declarations are in a header file and the function
- >definitions are in a cpp file which includes the header file. The cpp
- >file compiled fine, but the project window showed that the code size
- >equaled zero and when I tried to build and link the entire project I got
- >linker error messages that the member functions of the class were
- >undefined. I then changed the code so that the classes weren't templates
- >and the project was built and ran fine. My question is: how can I use
- >class templates in my program?
-
- In order to separate the template class declaration from its
- implementation, you need to use the -Jg switches. Check in the
- Programmers Guide for information.
-
-
- Earl Bennett
-
-
-